Skip to content

Conversation

@JaeHyuckSa
Copy link
Contributor

I have made things!

I added functions related to UniqueConstraint function in DRF version 3.15.

  • field_mapping.get_unique_validators
  • ModelSerializer.get_unique_together_constraints

Related issues

Upstream PR: encode/django-rest-framework#7438

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the same for all other Generator usages :)

def get_extra_kwargs(self) -> dict[str, Any]: ...
def get_unique_together_constraints(
self, model: _MT
) -> Generator[tuple[set[tuple[str, ...]], Manager[_MT]], None, None]: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) -> Generator[tuple[set[tuple[str, ...]], Manager[_MT]], None, None]: ...
) -> Iterator[tuple[set[tuple[str, ...]], Manager[_MT]], None, None]: ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sobolevn Thank you very much for your feedback :) I have made the necessary revisions based on your input!

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sobolevn sobolevn merged commit 373b63c into typeddjango:master Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants